(desktop-save): Save the buffer name if the uniquified base name is empty.
authorJuanma Barranquero <lekktu@gmail.com>
Fri, 29 Feb 2008 02:57:39 +0000 (02:57 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Fri, 29 Feb 2008 02:57:39 +0000 (02:57 +0000)
lisp/desktop.el

index 8be86571f1335e71660b55df7ab0368c6939e4f1..fbf9ed5c04493203399203f24a67bda7ba398d1e 100644 (file)
@@ -895,8 +895,9 @@ See also `desktop-base-file-name'."
                          "desktop-append-buffer-args")
                        " "
                        desktop-file-version)
-               ;; If the base name is non-nil, we save it instead of the buffer name
-               (when base (setcar (nthcdr 1 l) base))
+               ;; If there's a non-empty base name, we save it instead of the buffer name
+               (when (and base (not (string= base "")))
+                 (setcar (nthcdr 1 l) base))
                (dolist (e l)
                  (insert "\n  " (desktop-value-to-string e)))
                (insert ")\n\n"))))